import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index/index'  //首页
import deerSectionService from '@/components/index/deer-section-service'          //业务中心
import deerSectionCustomer from '@/components/index/deer-section-customer'        //顾客管理
import deerSectionFinance from '@/components/index/deer-section-finance'          //财务中心
import deerSectionMarketing from '@/components/index/deer-section-marketing'      //营销中心
import deerSectionBusiness from '@/components/index/deer-section-business'        //商业智能中心
import deerSectionConfig from '@/components/index/deer-section-config'            //系统设置
import deerSectionHelp from '@/components/index/deer-section-help'                //帮助与支持
import serviceUserOverview from '@/components/service/user/overview'              //业务中心-顾客管理-概览
// import serviceUserIndex from '@/components/service/user/index'                    //业务中心-顾客管理-订单流水
import serviceUserPrintlist from '@/components/service/user/printlist'            //业务中心-顾客管理-发票流水
import indexInfo from '@/components/service/user/index-info'

Vue.use(Router)

export default new Router({
  linkActiveClass:'active',
  // mode:'history',
  routes: [
    {
      path: '/', //首页
      name:'index',
      component: deerSectionService,
      children:[
        { path: '/', component: index },
      ]
    },
    {
      path: '/service', //业务中心
      name: 'service',
      component:deerSectionService,
      children:[
        { path:'user/overview',component:serviceUserOverview },
        { path: 'user/index', component: () => import('@/components/service/user/index') },
        { path: 'user/prinlist', component: serviceUserPrintlist },
      ]
    },
    {
      path: '/service/user/index/info', 
      name:"info",
      component: indexInfo
    },
    {
      path: '/customer', //顾客管理
      name: 'customer',
      component: deerSectionCustomer,
      children:[]
    },
    {
      path: '/finance', //财务中心
      name: 'finance',
      component: deerSectionFinance,
      children:[]
    },
    {
      path: '/marketing', //营销中心
      name: 'marketing',
      component: deerSectionMarketing,
      children:[]
    },
    {
      path: '/business', //商业智能中心
      name: 'business',
      component: deerSectionBusiness,
      children:[]
    },
    {
      path: '/config', //系统设置
      name: 'config',
      component: deerSectionConfig,
      children:[]
    },
    {
      path: '/help', //帮助与支持
      name: 'help',
      component: deerSectionHelp,
      children:[]
    }
  ]
})
